<?php
/*	Конфиг для jApi */
$conf=array(
	'incPath'=>'{docRoot}/lib/',
	'lang'=>'ru',
	'dbConf'=>array(
		'host' => 'localhost',
		'user' => 'root',
		'password' => '',
		'dbname' => 'sib_user',
		'set_names' => 'utf8',
	),
	'router'=>array(
	  'defOptRules'=>'(token)=(tn(X|\w{32}))',
	  'routes'=>array(
		  array('get','/', 'UserModel/def'),

			array('get','/user/(ur\w{32})/?', 'UserModel/getUser'),
			array('get','/byToken/(tn\w{32})/?', 'UserModel/getUserByToken'),
			array('get','/byEmail/?(([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4})?/?', 'UserModel/getUserByEmail'),

			array('get','/token/(tn\w{32})/?', 'UserModel/checkToken'),

			array('get','/geo/?([A-Z]{2,2}|\w{34})?/?', 'UserModel/getUsersByGeo', '(page)=(all|\d+)'),
			array('get','/near/?(\d+\.\d+)/(\d+\.\d+)/?(\d*)/?', 'UserModel/getUsersNear', '(page)=(all|\d+)'),

			array('post','/auth/?', 'UserModelEdit/authUser', '(email)=(.+@.+)&(password)=(.+)'),
			array('post','/register/?', 'UserModelEdit/postUser'),
		),
	),
);
return $conf;
?>